package com.wade.dao;

import com.wade.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface UserDao {
    @Select("select * from t_user where username=#{user.username} and password=#{user.password}")
    User login(@Param("user") User user);

    @Select("select * from t_user where username=#{username}")
    User findUser(String username);

    @Insert("insert into t_user(username,password,email) values(#{user.username},#{user.password},#{user.email})")
    void insert(@Param("user") User user);
}
